Portable electronic devices such as MP3 players, cameras, and cell phones are typically fitted with a USB port, which allows them to transfer data to or from other controllers or hosts, such as personal computers, notebooks, or televisions. Using these USB ports, portable devices may also charge their batteries by conveniently drawing current from the host.
Though this development greatly helps minimize the size of portable devices, it creates a few problems for the host. Most hosts typically work in multiple power modes such as fully-functional mode, sleep mode, hibernation mode, or shutdown mode. In each power mode the host draws a specific amount of current from its power supply (AC supply or battery). For example, in sleep mode (also referred to as “standby mode” or “suspend mode”), power is not supplied to any system components except the system RAM, substantially reducing power consumption as compared to the fully-functional mode. Typically, in hosts that run on battery (e.g., notebook), power consumption and available battery life is a primary operational concern, and therefore these systems may be configured to enter the sleep mode whenever the notebook is idle for a specified period. But, when a portable device connects to the host running on batteries (or in the sleep mode), the host may be forced to charge the portable device from its own depleted batteries, irrespective of the charge remaining in the host's battery.
Some of the present portable hosts attempt to restrict the charge drawn from the host when the host enters the sleep mode. One such host completely terminates current supply to USB ports in the sleep mode. Though this restriction is beneficial for the host, it may be detrimental for the portable device, as the portable device may not even have sufficient charge to make an emergency call. Another method initiates an internal timer when an attached portable device begins drawing current. The timer may be hard-coded or programmable. When the timer expires the host stops supplying current to the portable device. This solution, however, introduces some limitations. Because different portable devices draw charge at different rates, it is difficult to ascertain the charge drawn in the stipulated time. If the timer is set for a very short duration, the charge drawn by a device at the rate of 100 mA may not be enough to even power on the device. Alternatively, if the timer is set for a longer period, a device that draws 1A current may drain the host's battery in the stipulated time.
Therefore, there exists a need for a suitable method and system to ration the charge or energy drawn by a portable device.